/* 
 * File:   CompressionTasks.h
 * Author: Daniela Meneses
 */

#include "LZ77.h"

/**
 * Pointer to function type.
 */
typedef CompressionErrorCode(*PFCompressionAlgorithm)(const CompressionData& input, CompressionData* output);

/**
 * Execute a compression algorithm depending the function send it as parameter.
 * 
 * @param contentSize Size of the file
 * @param fileContent Content of the file
 * @param functocall Function to execute
 * 
 * @return The result of the compression algorithm called.
 */
CompressionErrorCode executeAlgorithm(const CompressionData& input, CompressionData* output, PFCompressionAlgorithm functionToCall)
{
    return functionToCall(input, output);
}
